The present invention relates to a drive control system. More particularly this invention relates to a drive control system for driving and controlling the plurality of servo motors or spindle motors in machine tools and industrial machines.
Drive control systems for driving and controlling the plurality of servo motors or spindle motors in machine tools and industrial machines are disclosed, for example, in Japanese Patent Application Laid-Open No. 3-245204 and Japanese Patent Application Laid-Open No. 4-290102.
FIG. 16 shows an outline of a prior art drive control system as disclosed in the above patent publications. This drive control system comprises one control unit 500, a plurality of servo amplifiers or spindle amplifiers (hereinafter called servo amplifiers) 510, and a plurality of remote input and output (remote IO) units 520, and the control unit (master) 500 is the host device, to which servo amplifiers (slaves) 510 with CPU and remote IO units 520 are connected with communication lines 600, 601 in two-way communication manner.
The control unit 500 includes the CPU (M/CPU) 501, a serial communication interface for servo amplifier 502, and a serial communication interface for IO unit 503. The serial communication interface for servo amplifier 502 and serial communication interface for IO unit 503 respectively incorporates transmission memories 502a, 503a, and reception memories 502b, 503b. 
The servo amplifier 510 individually has a CPU (S/CPU) 511, a motor drive circuit (M/D) 512, and a serial interface 513 for communication with the control unit 500, and a servo motor 530 is connected thereto. The serial communication interface 513 is same as the serial communication interface such as serial communication interface 502, and includes a transmission memory 513a and a reception memory 513b. 
The CPU 501 of the control unit 500 transmits command data or parameter to the servo amplifier 510 through the serial communication interface 502 by serial transmission, and the CPU 511 of the servo amplifier 510 receives the transmitted command data or parameter through the serial communication interface 513, and drives and controls the servo motor 530 by using the motor drive circuit 512.
The remote IO unit 520 includes a digital input interface (DI) 521, a digital output interface (DO) 522, and a serial communication interface 523 for communication with the control unit 500. The serial communication interface 523 is a same serial communication interface as the serial communication interface 503, and includes a transmission memory 523a and a reception memory 523b. 
The remote IO unit 520 transmits data of the state of DI interface 521 to the control unit 500 through the serial communication interface 523, and the control unit 500 receives the transmitted digital output data through the serial communication interface 523, and produces digital output from the DO interface 522.
FIG. 17 shows a prior art of serial communication interface used in such drive control system. A transmission memory 700 and a reception memory 701 are composed of dual port RAMs, and are connected to an external address bus 702 and an external data bus 703 at one side. A CPU 501 (511) writes transmission data from an external bus interface 704 into the transmission memory 700.
Transmission function in the serial communication interface begins by starting up a transmission-reception controller 706 by a transmission start signal from a synchronous clock generator 705. The transmission-reception controller 706 writes the transmission address set value and transmission data length set value being set in a transmission-reception control register setting unit 707 into a transmission address counter 708, and transmits the sequentially counted-up transmission address to an address decoder 709, so that the data in the transmission memory 700 is sent into a transmission register 710 to be transmitted. In a redundancy code generator 711, from similar transmission data, a redundancy code is generated, and after sending out the final transmission data, the redundancy code is sent into the transmission register 710 to be transmitted.
Reception function begins when the data received in a reception register 712 is transferred to a start flag detector 713, and the transmission-reception controller 706 is started by a start signal generated by detection of start flag in reception data. The transmission-reception controller 706 writes the reception address set value in the transmission-reception control register setting unit 707 into a reception address counter 714, and counts up at every data reception. By transmitting the counted-up reception address to the address decoder 709, reception data is written into the reception memory 701.
A communication failure detector 715 compares the redundancy code added to the end of the reception data and the redundancy code generated from the reception data, and detects if the communication is finished normally. The result of detection is written in the communication abnormality status in the transmission-reception control register setting unit 707. The CPU 501 (511) reads this communication abnormality status, and uses for control if normal, and discards the reception data if abnormal.
FIG. 18 shows communication timing in the conventional drive control system, and FIG. 19 shows outline of communication data. In FIG. 19, (a) shows communication data to be transmitted from the control unit 500 to the servo amplifier 510, (b) shows communication data to be transmitted from the servo amplifier 510 to the control unit 500, (c) shows communication data to be transmitted from the control unit 500 to the remote IO unit 520, and (d) shows communication data to be transmitted from the remote IO unit 520 to the control unit 500.
The control unit 500 transmits data simultaneously to the servo amplifier 510 and remote IO unit 520 in synchronism with the clock T1. As shown in FIG. 19(a) and FIG. 19(c), a synchronous code is included in the data transmitted from the control unit 500 to the servo amplifier 510, and in the data transmitted to the remote IO unit 520, and the servo amplifier 510 and remote IO unit 520 detect the synchronous code from the reception data, and generate a clock synchronized with clock T1 in the control unit 500.
The servo amplifier 510 divides this clock, and transmits the data shown in FIG. 19(b) to the control unit 500 at the predetermined timing indicated by codes S1 to S5 in FIG. 18. The remote IO unit 520 also transmits the data shown in FIG. 19(d) to the control unit 500 at the predetermined timing indicated by codes R1 to R7 in FIG. 18.
The command data transmitted from the control unit 500 to the servo amplifier 510 is entirely transmitted to the servo amplifier 510, and the feedback data taken in by the servo amplifier 510 is individually transferred from each servo amplifier 510 to the control unit 500, and is managed totally in the control unit 500. Similarly, the input data of the remote IO unit 520 is transferred to the control unit 500, and is managed totally in the control unit 500.
Data TS1, TS2 to TSn, RS1, RS2 to RSn in the transmission memory 502a and reception memory 502b for servo amplifiers in the control unit 500 shown in FIG. 16 show the sharing relation of transmission and reception data, and the control unit 500 totally manages the transmission and reception data of all servo amplifiers 510. By contrast, the data managed in each servo amplifier 510 is the own individual data, and it is known the data managed in each servo amplifier 510 is different. Data DO1, DO2 to DOn, DI1, DI2 to DIn in the transmission memory 503a and reception memory 503b for remote IO unit of the control unit 500 show the sharing relation of transmission and reception data, and the control unit 500 totally manages the transmission and reception data of all remote IO units 520, but the transmission and reception data managed in each remote IO unit 520 is also different in each unit.
In this conventional drive control system, the transmission and reception data of the servo amplifiers 510 and remote IO units 520 are totally managed in the control unit 500, but the data managed in each servo amplifier 510 is the own individual data, and mutual feedback state is not known among servo amplifiers 510.
Besides, since the communication system is separated between the remote IO units 520 and servo amplifiers 510, the state of the remote IO units 520 cannot be read directly from the servo amplifiers 510, or feedback data cannot be sent out.
In the conventional drive control system, meanwhile, since the transmission timing is managed in time division as shown in FIG. 18, if the quantity of data to be transferred is small, an idle time occurs in the transmission route, and the communication efficiency is poor, or the quantity of data exceeding the assigned transmission time cannot be transferred. Still more, the transmission timing is limited by the number of time divisions due to the number of axes to be connected, and since the transmission timing is divided in time, the transmission timing cannot be changed, and a communication line must be newly extended in order to add the servo amplifiers by more than the number of predetermined time divisions.
In the drive control system, the communication system for remote IO unit is required to respond to the input and output function at high speed, and therefore, in the prior art, it was necessary to transmit and receive data for the total number of input and output points of all remote IO units connected in every period regardless of the transmission in a constant period and changes of input and output states. As a result, data is exchanged more than necessary, the total number of remote IO units is limited to a smaller number, and the communication period (communication period T1 in FIG. 18) becomes long, thereby deteriorating the response.
In the transmission data, high speed data necessary for motor control and low speed data such as parameter coexist, and the quantity of communication data increases, and the communication time per data is extended, and hence the number of time divisions is limited.
Further, to read the state between servo amplifiers 510, it is required to transmit data twice through the control unit, and delay time occurs, and the performance of the entire drive control system is lowered. Moreover, the CPU 501 of the control unit 500 requires processing of transfer program, and the load of the CPU 501 increases.
As shown in FIG. 20(a), when the servo amplifier 510 requests output to a certain remote IO unit 520 through the communication system, it requires a series of processes including preparation of request data of DO output in the servo amplifier, transmission of request data, reception processing and preparation of request data of DO output in the master (control unit), transmission of request data of DO output, and reception processing in remote IO unit, and delay time of about 3 times of communication period T1 occurs, and the response is poor.
Similarly, receiving the input of the remote IO unit 520, to start the motor actually by the servo amplifier 510, as shown in FIG. 20(b), it requires a series of processes including transmission of DI data in the IO unit 520, reception processing and start signal processing in the master (control unit), data transmission, and start signal reception in the servo amplifier 510, the IO unit 520 input DI (start signal) and delay time of about 4 times of communication period T1 occurs, and the response is poor.
Other prior art of drive control system includes a drive control system for multiple axes for sharing part or all of input data by a plurality of servo amplifiers without using host control unit, and issuing output signals from each servo amplifier.
This drive control system is explained by referring to FIG. 21 to FIG. 24. FIG. 22 to FIG. 24 show one drive control system, which is divided into three drawings in order to avoid complicated expression of wiring.
There are three servo amplifiers 800 for first axis, second axis, and third axis, and they are composed identically, each comprising a CPU 801, a motor drive circuit 802, a digital input interface 803, a digital output interface 804, an analog input interface (A/D) converter 805 for speed command, and a pulse train input interface 806 for position command, and a servo motor 810 with a rotary encoder is connected to each servo amplifier 800.
As shown in FIG. 21(a), (b), (c), input signals of functions 1 to 8 are assigned in the digital input interface 803 of the servo amplifiers 800 for all of first to third axes, output signals of functions 11 to 18 are assigned in the digital output interface 804 for first axis, output signals of functions 21 to 24 for second axis, and output data of functions 31 and 32 for third axis.
When the input and output signals are assigned in the input and output interfaces of servo amplifiers 800 in this manner, the wiring of the input and output signals becomes as shown in FIG. 22. As shown in FIG. 22, input signals of functions 1 to 8 are branched in three terminals in a relay terminal block 820, and wired to servo amplifiers 800 for first to third axes, and many wires are needed. Output signals for functions 11 to 18, functions 21 to 24, and functions 31 and 32 are also wired from the servo amplifiers 800 to the relay terminal block 820.
In the servo amplifier 800 for first axis, since output signals for functions 11 to 18 are used, there is no vacancy in the digital output interface 804, but in the servo amplifiers 800 for second axis and third axis, there is a vacancy in the digital output interfaces 804. However, as the output function, if desired to add an output signal for function 19 to the servo amplifier 800 for first axis, there is no extra room for addition. Similarly, as input function, input signal for function 9 cannot be added.
Thus, in the conventional drive control system, multiple wires are connected to the servo amplifiers 800, and the wiring include many connections, and wiring and maintenance works are complicated. It is also difficult to add input and output functions, and input and output interfaces having extra input and output points may be prepared in the servo amplifiers 800.
As shown in FIG. 23, in the wiring of analog speed command signals, each one of the servo amplifiers 800 for first axis to third axis requires wiring of analog speed command signals, and a speed command unit 830 requires analog output interfaces 831 for several axes, and similar wiring is required if operating the servo amplifier 800 of each axis by the same analog speed command. In the wiring shown in FIG. 23, if the first axis to third axis are synchronously controlled by the same command, in case synchronous control fails due to some trouble, fluctuations cannot be controlled in each axis, and synchronism may deviated.
As shown in FIG. 24, in the wiring of pulse train position command signals, each one of the servo amplifiers 800 for first axis to third axis requires wiring of pulse strain command signals, and a position command unit 840 requires pulse generators 841 for several axes, and similar wiring is required if operating by the same position command.
The invention is devised to solve these problems, and it is hence an object thereof to present a drive control system capable of driving and controlling with an excellent response without increasing the load of CPU of the host control unit, and moreover excellent in transmission efficiency, and capable of decreasing the communication data quantity of high speed synchronous communication, determining the data length freely regardless of the divided time, and curtailing the number of wiring connections, and further flexible in addition of input and output functions, and capable of realizing advanced synchronous operation and arbitrary synchronous operation without causing deviation in synchronism.
To achieve the object, the invention presents a drive control system having constituent devices such as control unit, servo amplifier, spindle amplifier, and input and output unit, with these constituent devices connected so as to communicate with each other, in which a memory is provided in each constituent device, the constituent devices are synchronized with each other, communication unit is provided for transferring memory data between arbitrary constituent devices, and the memory is shared between arbitrary constituent devices.
Therefore, since the memory can be shared in the drive control system, batch management of memories of control unit is not necessary, and the load of the control unit CPU is not increased, and time delay does not occur, the feedback state is mutually known among servo amplifiers, and the output request can be directly sent from the servo amplifier to the input and output unit, and the input state can be read immediately.
In the drive control system of the invention, the communication data is composed of a synchronous packet used for generating a clock transmitted in a specific period so that all constituent devices are synchronized therewith, an in-channel communication packet used for sharing the memory within a same group, an allout communication packet used for sharing the memory by all constituent devices, and a designated destination communication packet for communicating by designating the destination of transmission of parameter, etc.
Therefore, the idle time of transmission route is shortened and the transmission efficiency is enhanced, and the data requiring high speed synchronous communication is changed into a synchronous packet and an in-channel communication packet, while the low speed data is changed to a designated destination transmission, and hence the communication data quantity of high speed synchronous communication is decreased, and the number of axes to be connected is increased. At the same time, the data length can be determined arbitrarily regardless of the divided time.
In the drive control system of the invention, further, the control unit and servo amplifier has a communication memory in each channel, a transmitter transmits the in-channel communication packet including channel designated value, address, transmission data length and data to all constituent devices, and a receiver judges approval or rejection of reception by collating the channel designated value included in the communication packet and the channel set value set in the parameter in each servo amplifier, and writes the data of the communication packet of the collated channel in the communication memory in the memory.
Therefore, the communication in the channel is made in the same procedure as the allout communication, and the size of the memory can be set in an appropriate capacity in each channel.
Also in the drive control system of the invention, the control unit, servo amplifier and input and output unit have allout communication memories, a transmitter transmits an allout communication packet including the sender number, address, transmission data length, variable data length, previous data, and rewrite data to all constituent devices, and a receiver compares the received previous data and the data in the present allout communication memory, rewrites the data in the allout communication memory if matched, and stops writing into the allout communication memory if not matched.
Therefore, since the data can be transmitted by designating the address and data length, the memory common to the constituent devices of the drive control system can be managed, and instead of communicating data of all input points in all input and output units in every specific period as in the prior art, only the changed input and output data are communicated, so that the efficiency of transmission route is enhanced.
Also in the drive control system of the invention, a transmitter adds a redundancy code to the communication packet in every quantity of data suited to the size of the buffer of transmission and reception, and a receiver detects communication failure according to the redundancy code in every quantity of data suited to the size of the buffer of transmission and reception, and stops writing into the memory if abnormal.
Therefore, by adding the plurality of redundancy codes in the communication data, data exceeding the reception buffer can be received, and if communication failure occurs in the received data, breakdown of shared memory can be prevented.
Also in the drive control system of the invention, the waiting time of each communication following the synchronous packet is shortened depending on the priority order, and when a constituent device high in priority order starts transmission within waiting time, reception is started, and after completion of reception if other constituent device does not start transmission after lapse of a specified waiting time, transmission is started.
Therefore, the idle time of transmission route is shortened and the transmission efficiency is enhanced, and the data requiring high speed synchronous communication is changed into a synchronous packet and an in-channel communication packet, while the low speed data is changed to a designated destination transmission, and hence the communication data quantity of high speed synchronous communication is decreased, and the number of axes to be connected is increased.
Also in the drive control system of the invention, the memory storing the input data, output data, position command, and speed command is shared by the constituent devices.
Therefore, it is not necessary to connect wiring of signal lines of input data, output data, position command, and speed command repeatedly in every constituent device.
Also in the drive control system of the invention, the present position data of each axis is shared by the synchronous axis, and it is controlled to prevent deviation of synchronism by referring to the position data.
Therefore, advanced synchronous operation is realized by preventing deviation of synchronism relating to the position control.
Also in the drive control system of the invention, the present speed data of each axis is shared by the synchronous axis, and it is controlled to prevent deviation of synchronism by referring to the speed data.
Therefore, advanced synchronous operation is realized by preventing deviation of synchronism relating to the speed control.
Also in the drive control system of the invention, each servo amplifier has a regenerative resistor selectively set in conductive state by a regenerative transistor, the memory storing the regenerative load factor data of each axis, regenerative transistor state data, and bus voltage data is shared by each servo amplifier, and it is controlled to turn on the regenerative transistor of the servo amplifier smallest in the regenerative load factor data known from these data.
Therefore, the regenerative energy is consumed by the regenerative resistor of the servo amplifier smallest in the regenerative load factor data, so that concentration of regenerative load can be prevented.